import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/views/layout/repairLayout.vue'),
      redirect: '/ordercenter/orderlist',
      children: [
        {
          path: '/', //统计分析
          component: () => import('@/views/staAnalysis/staAnalysis.vue')
        },
        {
          path: '/ordercenter/orderlist', //订单列表
          component: () => import('@/views/ordercenter/orderList.vue')
        },
        {
          path: '/ordercenter/orderrepair', //维修订单
          component: () => import('@/views/ordercenter/orderRepair.vue')
        },
        {
          path: '/ordercenter/myOrder', //我的订单
          component: () => import('@/views/ordercenter/myOrder.vue')
        },
        {
          path: '/repairmanage/createform', //创建表单
          component: () => import('@/views/repairmanage/createform.vue')
        },
        {
          path: '/repairmanage/onerepair', //一键维修
          component: () => import('@/views/repairmanage/onePepair.vue')
        },
        {
          path: '/invitejoin/invitejoin', //加入我们
          component: () => import('@/views/invitejoin/invitejoin.vue')
        },
        {
          path: '/equipmangement/equiplist', //设备管理
          component: () => import('@/views/equipmanagement/equipList.vue')
        },
        {
          path: '/perManagement/perlist', //人员管理
          component: () => import('@/views/permanagement/perList.vue')
        },
        {
          path: '/sparemangement/sparelist', //配件管理
          component: () => import('@/views/sparemanagement/spareList.vue')
        },
        {
          path: '/rollimage/rollimagelist', //轮播图管理
          component: () => import('@/views/rollimage/rollimageList.vue')
        },
        {
          path: '/annouceMange/newAnnouceMange', //新建公告
          component: () => import('@/views/annouceMange/newAnnoucemange.vue')
        },
        {
          path: '/annouceMange/annouceMangelist', //公告列表
          component: () => import('@/views/annouceMange/annoucemangeList.vue')
        },
        {
          path: '/knowledgeMange/newknowledgeMange', //新建知识库
          component: () =>
            import('@/views/knowledgeMange/newKnowledgemange.vue')
        },
        {
          path: '/inspectionCenter/myOrder', //点检中心
          component: () => import('@/views/inspectionCenter/myOrder.vue')
        },
        {
          path: '/inspectionCenter/InventoryTask', //点检任务表
          component: () => import('@/views/inspectionCenter/InventoryTask.vue')
        },
        {
          path: '/maintenModle/maintenList', //保养列表
          component: () => import('@/views/maintenModle/maintenList.vue')
        },
        {
          path: '/knowledgeMange/knowledgeMangelist', //知识库列表
          component: () =>
            import('@/views/knowledgeMange/knowledgeMangelist.vue')
        }
      ]
    }
  ]
})

export default router
